/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';

import PropsComponent from './PropsComponent'
import HelloComponent from './HelloComponent'
import LifecycleComponent from './LifecycleComponent.js'
import ElComponent,{name,age,sun} from './ElComponent.js'
import StatusText from './StatusText.js'
import RefText from './RefText.js'
import FlexBox from './FlexBox.js'
export default class setup extends Component {
  constructor(props){
    super(props)
    this.state = ({
        remove:false,
        result:'',
        size:0
    })
  }
  // render() {
  //   let view = this.state.remove ? null : <ElComponent /> , text = this.state.remove ? '显示' : '卸载'
  //   let params = {name:'小张',age:5000,sex:'man'}
  //   let {name,age} = params
  //   return (
  //     <View >
  //      // <PropsComponent name={name} age={age} />
  //         <Text style={{fontSize:20}}>{name}</Text>
  //         <Text style={{fontSize:20}}>{age}</Text>
  //         <Text style={{fontSize:20}} onPress={()=>{
  //             this.setState({
  //               result:sun(1,10)
  //             })
  //         }}>1+10={this.state.result}</Text>
  //         <StatusText />
  //           <Text style={{fontSize:20}} 
  //             onPress={()=>{
  //               //let size = this.refs.reftext.getSize()
  //               //let size = this.refs['reftext'].getSize()
  //               let size = this.reftest.getSize()  
  //               this.setState({
  //                 size:size
  //               }) 
  //             }}
  //           >获取气球大小:{this.state.size}</Text>
  //         <RefText 
  //         //ref="reftext" 
  //           ref={reftest => this.reftest=reftest}
  //         />
  //     </View>

  //   );
  // }
  render(){
    return (
      <View>
        <FlexBox />
      </View>  

      )
  }
}




